<!DOCTYPE html>












  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">






















<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=6.6.0" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=6.6.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=6.6.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=6.6.0">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=6.6.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '6.6.0',
    sidebar: {"position":"right","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="chengwei1123@gmail.com">
<meta property="og:type" content="website">
<meta property="og:title" content="glegoo">
<meta property="og:url" content="https://glegoo.gitee.io/blog/index.html">
<meta property="og:site_name" content="glegoo">
<meta property="og:description" content="chengwei1123@gmail.com">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="glegoo">
<meta name="twitter:description" content="chengwei1123@gmail.com">



  <link rel="alternate" href="/blog/atom.xml" title="glegoo" type="application/atom+xml">




  <link rel="canonical" href="https://glegoo.gitee.io/blog/">



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>glegoo</title>
  






  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?eba657066bacb7bc0148825c27994b83";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>






  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-right 
  page-home">
    <div class="headband"></div>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">glegoo</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">blog</p>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">

    
    
    
      
    

    

    <a href="/blog/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">

    
    
    
      
    

    

    <a href="/blog/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">

    
    
    
      
    

    

    <a href="/blog/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>

  </li>

      
      
    </ul>
  

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://glegoo.gitee.io/blog/blog/2019/01/09/Unity-ShaderLab-速查表/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="glegoo">
      <meta itemprop="description" content="chengwei1123@gmail.com">
      <meta itemprop="image" content="/blog/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="glegoo">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/blog/blog/2019/01/09/Unity-ShaderLab-速查表/" class="post-title-link" itemprop="https://glegoo.gitee.io/blog/index.html">Unity ShaderLab常用变量·语义·函数速查表</a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2019-01-09 09:18:49 / 修改时间：10:32:48" itemprop="dateCreated datePublished" datetime="2019-01-09T09:18:49+08:00">2019-01-09</time>
            

            
              

              
            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>持续更新……</p>
<hr>
<h2 id="Unity内置的变换矩阵"><a href="#Unity内置的变换矩阵" class="headerlink" title="Unity内置的变换矩阵"></a>Unity内置的变换矩阵</h2><table>
<thead>
<tr>
<th>变量名</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>UNITY_MATRIX_MVP</td>
<td>当前的模型·观察·投影矩阵，用于将顶点/方向矢量从模型空间变换到裁剪空间</td>
</tr>
<tr>
<td>UNITY_MATRIX_MV</td>
<td>当前的模型·观察矩阵，用于将顶点顶点/方向矢量从模型空间变换到观察空间</td>
</tr>
<tr>
<td>UNITY_MATRIX_V</td>
<td>当前的观察矩阵，用于将顶点顶点/方向矢量从世界空间变换到观察空间</td>
</tr>
<tr>
<td>UNITY_MATRIX_P</td>
<td>当前的观察矩阵，用于将顶点顶点/方向矢量从观察空间变换到裁剪空间</td>
</tr>
<tr>
<td>UNITY_MATRIX_VP</td>
<td>当前的观察·投影矩阵，用于将顶点顶点/方向矢量从世界空间变换到裁剪空间</td>
</tr>
<tr>
<td>UNITY_MATRIX_T_MV</td>
<td>UNITY_MATRIX_MV 的转置矩阵</td>
</tr>
<tr>
<td>UNITY_MATRIX_IT_MV</td>
<td>UNITY_MATRIX_MV 的逆转置矩阵，用于将法线从模型空间变换到观察空间，也可用于得到 UNITY_MATRIX_MV 的逆矩阵</td>
</tr>
<tr>
<td>_Object2World</td>
<td>当前的模型矩阵，用于将顶点顶点/方向矢量从模型空间变换到世界空间</td>
</tr>
<tr>
<td>_World2Object</td>
<td>_Object2World的逆矩阵，用于将顶点顶点/方向矢量从世界空间变换到模型空间</td>
</tr>
</tbody>
</table>
          <!--noindex-->
          
            <div class="post-button text-center">
              <a class="btn" href="/blog/2019/01/09/Unity-ShaderLab-速查表/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
         
          <!--/noindex-->
        
      
    </div>

    

    
    
    

    

    
       
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://glegoo.gitee.io/blog/blog/2019/01/07/上传苹果商店authenticating-with-the-itunes-store问题解决方案/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="glegoo">
      <meta itemprop="description" content="chengwei1123@gmail.com">
      <meta itemprop="image" content="/blog/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="glegoo">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/blog/blog/2019/01/07/上传苹果商店authenticating-with-the-itunes-store问题解决方案/" class="post-title-link" itemprop="https://glegoo.gitee.io/blog/index.html">上传苹果商店authenticating with the itunes store问题解决方案</a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2019-01-07 17:44:31" itemprop="dateCreated datePublished" datetime="2019-01-07T17:44:31+08:00">2019-01-07</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2019-01-09 09:13:08" itemprop="dateModified" datetime="2019-01-09T09:13:08+08:00">2019-01-09</time>
              
            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>被这个问题折磨的死去活来. 整理一下来自stackoverflow的答案以及个人经验. </p>
<p><strong>如果你一次都没成功过, 的确要考虑网络问题.</strong></p>
<p>比如防火墙之类.假如你之前成功过, 但是突然不好使了,可以参考以下答案. </p>
<hr>
<h2 id="使用Application-Loader"><a href="#使用Application-Loader" class="headerlink" title="使用Application Loader"></a>使用Application Loader</h2><p>如果你使用Xcode的Organizer上传无效, 可以尝试使用Application Loader. 在Xcode的菜单栏中选择 <code>Xcode-&gt;Open Developer Tool-&gt;Application Loader</code>.<br>
          <!--noindex-->
          
            <div class="post-button text-center">
              <a class="btn" href="/blog/2019/01/07/上传苹果商店authenticating-with-the-itunes-store问题解决方案/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
         
          <!--/noindex-->
        
      
    </p></div>

    

    
    
    

    

    
       
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://glegoo.gitee.io/blog/blog/2018/12/28/H5游戏-web-socket-连接TCP服务器解决方案/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="glegoo">
      <meta itemprop="description" content="chengwei1123@gmail.com">
      <meta itemprop="image" content="/blog/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="glegoo">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/blog/blog/2018/12/28/H5游戏-web-socket-连接TCP服务器解决方案/" class="post-title-link" itemprop="https://glegoo.gitee.io/blog/index.html">H5游戏(web-socket)连接TCP服务器解决方案</a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-12-28 14:04:08 / 修改时间：16:28:32" itemprop="dateCreated datePublished" datetime="2018-12-28T14:04:08+08:00">2018-12-28</time>
            

            
              

              
            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>伴随着H5技术越来越成熟，微信小程序以及小游戏的兴起，有越来越多的需求将现有的应用程序轻量化。此前公司需求将游戏APP端移植到H5，就产生了如下问题：<strong>H5无法与原有的TCP服务器直接连接，只能采用web-socket</strong>。<br><br>将原有的TCP服务器改写也不太现实。除了耗时耗力以外，我们还希望客户端与H5的玩家可以同服游戏。所以需要一个中转工具来实现web-socket与tcp的互连。由于移植工作只有我一人在做，而我又是客户端程序，对服务器代码不甚了解。于是在网上苦苦寻找之后，找到了这么一个项目。<br></p>
<p><a href="https://github.com/andrewchambers/ws-tcp-bridge" target="_blank" rel="noopener">https://github.com/andrewchambers/ws-tcp-bridge</a></p>
<p>非常简单直接! 按照说明中配置即可。每个TCP通信端口需要准备一个空闲的端口来做中转。每个端口需要开启两个中转程序，用于收和发。</p>
<h1 id="使用说明"><a href="#使用说明" class="headerlink" title="使用说明"></a>使用说明</h1><p>我们采用在npm中安装的方式，省去配置环境变量的麻烦。此文中服务器环境为Windows。<br>
          <!--noindex-->
          
            <div class="post-button text-center">
              <a class="btn" href="/blog/2018/12/28/H5游戏-web-socket-连接TCP服务器解决方案/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
         
          <!--/noindex-->
        
      
    </p></div>

    

    
    
    

    

    
       
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
  </section>

  


          </div>
          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/blog/images/avatar.jpg" alt="glegoo">
            
              <p class="site-author-name" itemprop="name">glegoo</p>
              <p class="site-description motion-element" itemprop="description">chengwei1123@gmail.com</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/blog/archives/">
                
                    <span class="site-state-item-count">3</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/blog/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">8</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/blog/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="https://github.com/glegoo" title="GitHub &rarr; https://github.com/glegoo" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="mailto:chengwei1123@gmail.com" title="E-Mail &rarr; mailto:chengwei1123@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="https://www.zhihu.com/people/glegoo/activities" title="知乎 &rarr; https://www.zhihu.com/people/glegoo/activities" rel="noopener" target="_blank"><i class="fa fa-fw fa-知乎"></i>知乎</a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                    
                  
                  
                    
                  
                  <a href="https://www.douban.com/people/54250291" title="豆瓣 &rarr; https://www.douban.com/people/54250291" rel="noopener" target="_blank"><i class="fa fa-fw fa-豆瓣"></i>豆瓣</a>
                </span>
              
            </div>
          

          

          
          

          
            
          
          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">glegoo</span>

  

  
</div>


  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.8.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> v6.6.0</div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>
















  
  



  
  



  
  







  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/three/three-waves.min.js"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/three/canvas_lines.min.js"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/three/canvas_sphere.min.js"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=6.6.0"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=6.6.0"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=6.6.0"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=6.6.0"></script>



  

  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=6.6.0"></script>



  



  










  





  

  

  

  

  

  
  

  

  

  

  

  

  

</body>
</html>
